﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VcAssayEdit.aspx.cs" Inherits="StoragePeriod.Web.FoodTesting.VcFood.VcAssayEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Vc含量检测</title>
    <link href="/Styles/MainStyle.css" rel="stylesheet" type="text/css" />
    <link href="/Scripts/artDialog/skins/default.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <style type="text/css">
        .TitleTabs{ width:100%; height:25px; border-bottom:1px solid #3bb9f3; margin:0px auto; padding-top:10px;}
        .TitleTabs li{float:left; width:100px; height:25px; line-height:25px; margin-left:10px;}
        .TitleTabs li a{ display:block; width:100px; height:24px; line-height:24px; border:1px solid #3bb9f3; border-bottom:0px; text-align:center; background-color:#b9eefe; color:#000; font-weight:600;}
        .TitleTabs .TabsOver{border-bottom:1px solid #fff; background-color:#fff; color:#f90;}
        .Mean{ float:left; font-size:12px; font-weight:600; color:#f90;}
    </style>
    <script type="text/javascript">
        //验证控件是否为空
        function IsNotNull() {
            var b = true;
            if ($("#MainContent_txt_C").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V1").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V2").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_V_2").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_A").val() == "") {
                b = false;
            }
            if ($("#MainContent_txt_W").val() == "") {
                b = false;
            }
            if (!b) {
                alert("请完整输入参数。");
            }
            return b;
        }

        //根据检测次数 打开新窗体
        function OpenIframe(RawID, FoodTime, FoodNum) {
            window.location.href = 'VcAssayEdit.aspx?RawID=' + RawID + "&FoodTime=" + FoodTime + "&FoodNum=" + FoodNum + "&rid=" + Math.random();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="TitleTabs">
        <ul>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="1"?"TabsOver":""%>" href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',1);">第一次检测</a></li>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="2"?"TabsOver":""%>" href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',2);">第二次检测</a></li>
            <li><a class="<%=Request.QueryString["FoodNum"].ToString()=="3"?"TabsOver":""%>" href="javascript:OpenIframe('<%=Request.QueryString["RawID"].ToString()%>','<%=Request.QueryString["FoodTime"].ToString()%>',3);">第三次检测</a></li>
        </ul>
    </div>
    <div style="width:670px; margin:0px auto;">
        <div style="padding-top:20px;">
            <table border="0" cellpadding="0" cellspacing="0" width="98%" style=" margin:0px auto;">
                <tr>
                    <td width="300px;">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td style="width:120px;">滴定度(T):</td>
                                <td colspan="3"><asp:TextBox style="width:100px;" ID="txt_T" runat="server" Enabled="false" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="right">C:</td><td><asp:TextBox style="width:100px;" ID="txt_C" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                                <td align="right">V:</td><td><asp:TextBox style="width:100px;" ID="txt_V" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td align="right">V1:</td><td><asp:TextBox style="width:100px;" ID="txt_V1" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                                <td align="right">V2:</td><td><asp:TextBox style="width:100px;" ID="txt_V2" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top" style="padding-left:10px;">
                        说明:<br />
                        T:每毫升2，6二氯靛酚溶液相当于抗坏血酸的毫克数<br />
                        C:抗坏血酸的浓度,mg/ml<br />
                        V:吸取抗坏血酸的体积,ml<br />
                        V1:滴定抗坏血酸所用2，6二氯靛酚溶液的体积，ml<br />
                        V2:滴定空白所用2，6二氯靛酚溶液的体积,ml
                    </td>
                </tr>
                <tr>
                    <td colspan="2" style="padding-bottom:20px;">
                        T计算公式:T(mg/ml)=(C*V)/(V1-V2)&nbsp;&nbsp;默认值设置时间：<asp:Label ID="lab_DefaultTime" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </div>
        <div style="width:100%;padding-top:20px; padding-bottom:10px; border-top:1px solid #ccc;">
            <table border="0" cellpadding="0" cellspacing="0"  width="98%" style=" margin:0px auto;">
                <tr>
                    <td width="300px;">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td width="80px" align="right">V:</td><td colspan="3"><asp:TextBox style="width:100px;" ID="txt_V_2" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td width="80px" align="right">A:</td><td><asp:TextBox style="width:100px;" ID="txt_A" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                                <td width="50px" align="right">W:</td><td><asp:TextBox style="width:100px;" ID="txt_W" runat="server" CssClass="text ui-widget-content ui-corner-all"></asp:TextBox></td>
                            </tr>
                        </table>
                    </td>
                    <td valign="top" style="padding-left:10px;">
                        说明:<br />
                        2:所用2，6二氯靛酚染料的体积，ml<br />
                        V:测得2，6二氯靛酚溶液的体积，ml<br />
                        A:稀释倍数：此处根据实验取10<br />
                        T:染料滴定度，mg/ml<br />
                        W:样品重量,g<br />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        VC计算公式:Vc(mg/100g)=[(2-V)*T*A/W]*100
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div class="aui_buttons">
            <div class="Mean">
                平均值：<asp:Label ID="labMean" runat="server" Text=""></asp:Label>
            </div>
            <asp:Button Text="提交" runat="server" CssClass="aui_state_highlight" ID="btPost" OnClientClick="return IsNotNull()" OnClick="btPost_Click"/>
            <asp:Button Text="计算平均值" runat="server" CssClass="aui_state_highlight" ID="btnMean" onclick="btnMean_Click" />
        </div>
    </form>
</body>
</html>
